<?php

$con = mysql_connect("localhost","root","flower");
if($con){
	//echo "数据库连接成功";
}else {
	echo "数据库连接不成功";
}
mysql_query("set names utf8");
$sql = "show databases";
$res = mysql_query($sql);
if($res){
	while($one_arr[] = mysql_fetch_array($res)){
		$one_arr[] = mysql_fetch_array($res);
	}
}
//print_r($one_arr);
?>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
*{
	margin:0px;
	padding:0px;}
	body{
		background-color:#E7728C;
		font-family:"微软雅黑";}
	#cai{
		width:200px;}
	#cai ul{
		list-style-type:none;
		margin:0;
		padding:0;}
	#cai ul li{
		border-bottom:1px solid #FFF;}
	#cai ul li a{
		display:block;
		text-decoration:none;
		background-color:#DA2C38;
		color:#FFF;
		border-left:12px solid #B61626;
		border-right:1px solid #B61626;
		padding:5px 5px 5px 15px;}
	#cai ul li a:hover{
		background-color:#B01C20;}

</style>
</head>

<body>
	<div id="cai">   	
    	<ul>
    		<?php foreach($one_arr as $v){?>
    		<?php if(!empty($v[0])){?>
    		<li><a href="tables.php?name=<?php echo $v[0]?>" target="right"><?php echo $v[0]?></a></li>
    		<?php }?>
    		<?php }?>
            <li><a href="right.php" target="right">创建/删除数据库</a></li>
    		    		
        	<!--  <li><a href="1.html" target="right">菜单一</a></li>
            <li><a href="2.html" target="right">菜单二</a></li>
            <li><a href="3.html" target="right">菜单三</a></li>
            <li><a href="4.html" target="right">菜单四</a></li>
            <li><a href="5.html" target="right">菜单五</a></li>-->
        </ul>
    </div>
</body>
</html>
